home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / LANG / SCHEME / GNU / SCM4E1 / !Scm / slib / pp < prev    next >
Text File  |  1992-10-19  |  394b  |  13 lines

  1. ; File: "pp.scm"   (c) 1991, Marc Feeley
  2.  
  3. (require 'generic-write)
  4.  
  5. ; (pretty-print obj port) pretty prints 'obj' on 'port'.  The current
  6. ; output port is used if 'port' is not specified.
  7.  
  8. (define (pp:pretty-print obj . opt)
  9.   (let ((port (if (pair? opt) (car opt) (current-output-port))))
  10.     (generic-write obj #f 79 (lambda (s) (display s port) #t))))
  11.  
  12. (define pretty-print pp:pretty-print)
  13.